package com.training.bt.resource.service;

import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

import org.springframework.http.ResponseEntity;

import com.training.bt.common.PageResponseDTO;
import com.training.bt.entity.Resource;
import com.training.bt.resource.dto.*;

public interface ResourceService {
    Long uploadResource(ResourceUploadDTO dto) throws IOException, NoSuchAlgorithmException;

    PageResponseDTO<ResourceListItemDTO> getList(int page, int size, String keyword, Long tagIds);

    ResponseEntity<ResourceDetailsDTO> findById(Long id);

    PageResponseDTO<ResourceMyDetailsDTO> getMyList(int page, int size);

    void deleteById(Long id);

    ResourceDownloadDTO getResourceFilePath(Long id);

    void reviewResource(ResourceReviewDTO dto);

    PageResponseDTO<ResourceListItemDTO> getPendingResource(int page, int size);

    ResourceListItemDTO getReviewResource(Long id);

    Resource selectById(Long id);

    void updateDownloadCount(Resource resource);

    List<Resource> getAllActiveResources();
}
